home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Browser - Artopolis 97
/
browser.iso
/
mac
/
artrope
/
artrope.dir
/
00005_Script_Cut -n- paste Lingo handlers MAC
< prev
next >
Wrap
Text File
|
1997-10-08
|
3KB
|
109 lines
--Cut and paste Lingo handlers
--PrefsFolder XObject version 1.01, 7/24/96
--Copyright ⌐ 1996 Glenn M. Picher, Dirigo Multimedia
--Email: gpicher@maine.com
--Web: http://www.maine.com/shops/gpicher
--Phone: (207)767-8015 (South Portland, Maine, USA)
--Distribute freely. No licensing required.
--Also distributed by g/matter, inc.
--Email: support@gmatter.com
--Web: http://www.gmatter.com
--Phone: (415)243-0394
-- End user handlers ----------------------------------------------
on getPrefsFolder
global gPrefsFolderObject
insurePrefsFolder()
set theFolder = gPrefsFolderObject(mPrefsFolder)
if char 1 to 7 of theFolder = ":Error:" then
warning theFolder
end if
return theFolder
end
on showWarnings
global gShowWarnings
set gShowWarnings to TRUE
end
on hideWarnings
global gShowWarnings
set gShowWarnings to FALSE
end
-- Support handlers ----------------------------------------------
--These handlers are called from the handlers above.
--You needn't call them directly (although you might wish to
--include openPrefsFolder() in your startMovie() handler, and
--closePrefsFolder() in your stopMovie() handler or final 'quit'
--button.
--Change the pathname or filename in the openPrefsFolder() handler
--if the XObject is not located in the same place as the
--Director movie or projector. Change closePrefsFolder()
--similarly.
on openPrefsFolder
if xobjectLoaded("PrefsFolder") then return TRUE
if the machineType < 256 then
openxlib the pathname & "XTRAS:"&"PrefsFolder XObject"
else
warning "PrefsFolder is designed only for the Macintosh!"
return FALSE
end if
if not xobjectLoaded("PrefsFolder") then
warning "PrefsFolder XObject didn't register."
return FALSE
end if
return TRUE
end
on closePrefsFolder
global gPrefsFolderObject
if objectP(gPrefsFolderObject) then gPrefsFolderObject(mDispose)
if not xobjectLoaded("PrefsFolder") then return TRUE
if the machineType < 256 then
closexlib the pathname & "XTRAS:" & "PrefsFolder XObject"
else
warning "PrefsFolder is designed only for the Macintosh!"
return FALSE
end if
if xobjectLoaded("PrefsFolder") then
warning "PrefsFolder XObject wouldn't close-- do objects still exist?"
return FALSE
end if
return TRUE
end
on insurePrefsFolder
global gPrefsFolderObject
if objectP(gPrefsFolderObject) then return TRUE
if not openPrefsFolder() then
warning "insurePrefsFolder(): openPrefsFolder() failed"
abort
end if
put PrefsFolder(mNew) into gPrefsFolderObject
if not objectP(gPrefsFolderObject) then
warning "insurePrefsFolder(): couldn't create object"
abort
end if
return true
end
on xobjectLoaded theName
if not stringP(theName) then
warning "xobjectLoaded(): theName not a string"
return false
end if
return objectP(factory(theName))
end
on warning theMessage
global gShowWarnings
if not (gShowWarnings = TRUE) then return
alert theMessage
end